u $data\edex_data_analytic, clear

qui gen mathexp = 1 if bytm20==1 | bytm20==2
qui replace mathexp = 2 if bytm20>=3 & bytm20<=4
qui replace mathexp = 3 if bytm20>=5

qui gen elaexp = 1 if byte20==1 | byte20==2
qui replace elaexp = 2 if byte20>=3 & byte20<=4
qui replace elaexp = 3 if byte20>=5

qui label var mathexp "Math Teacher Expectation"
qui label var elaexp "English Teacher Expectation"
qui label define expect 1 "HS or Less" 2 "Some College" 3 "Bachelor's or More"
qui label values mathexp expect
qui label values elaexp expect

tab mathexp elaexp, cell label
tab mathexp elaexp if cbyrace6==1, cell label
tab mathexp elaexp if cbyrace3==1, cell label
